<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    <div class="container-div ui-layout-center">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="user-form">
					<input type="hidden" id="deptId" name="deptId">
	                <input type="hidden" id="parentId" name="parentId">
					<div class="select-list">
						<ul>
							<li>
								项目名称：<input type="text" name="prjNm" id="prjNm"/>
							</li>
							<li>
								版本日期：
                                <select id="vrsnDt" name="vrsnDt" th:with="type=${@prjVrsnDtRel.selectPrjVrsnDtRelListAll()}">
                                    <option value="">请选择</option>
									<option th:each="prjVrsnDtRel : ${type}" th:text="${prjVrsnDtRel.vrsnDt}" th:value="${prjVrsnDtRel.vrsnDt}"></option>
								</select>
							</li>
							<li>
								开发流：
                                <select id="dvlpstrmNm" name="dvlpstrmNm" th:with="type=${@devVersionContrlServiceImpl.selectDevStream()}">
                                    <option value="">请选择</option>
                                    <option th:each="devVersionContrlServiceImpl : ${type}" th:text="${devVersionContrlServiceImpl.devStream}" th:value="${devVersionContrlServiceImpl.devVersionId}" ></option>
                                </select>
							</li>
							<li>
								发布方式：
                                <select id="ancMod" name="ancMod" th:with="type=${@dict.getType('anc_mod')}">
                                    <option value="">请选择</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
							</li>
							<li>
								发布模式：
                                <select id="ancModeInd" name="ancModeInd" th:with="type=${@dict.getType('anc_mode_ind')}">
                                    <option value="">请选择</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
							    <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>

	        <div class="btn-group-sm hidden-xs" id="toolbar" role="group">
	        	<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="rtms:vrsnAncCfgMgt:add">
	                <i class="fa fa-plus"></i> 新增
	            </a>
	            <a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="rtms:vrsnAncCfgMgt:edit">
		            <i class="fa fa-edit"></i> 修改
		        </a>
	            <a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="rtms:vrsnAncCfgMgt:remove">
	                <i class="fa fa-remove"></i> 删除
	            </a>
	        </div>

	        <div class="col-sm-12 select-table table-striped">
			    <table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('rtms:vrsnAncCfgMgt:edit')}]];
        var removeFlag = [[${@permission.hasPermi('rtms:vrsnAncCfgMgt:remove')}]];
        var prefix = ctx + "rtms/vrsnAncCfgMgt";
        var ancModDatas = [[${@dict.getType('anc_mod')}]];
        var ancModeIndDatas = [[${@dict.getType('anc_mode_ind')}]];

        $(function() {
            var options = {
            	uniqueId: "lgcPk",
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                modalName: "版本发布配置管理",
                columns: [{
		            checkbox: true
		        },
				/* {
					field : 'lgcPk',
					title : '逻辑主键'
				},
				{
					field : 'prjId',
					title : '项目编号'
				},*/
				{
					field : 'prjNm',
					title : '项目名称'
				},
				/* {
					field : 'dvlpstrmId',
					title : '开发流编号'
				}, */
				{
					field : 'dvlpstrmNm',
					title : '开发流名称'
				},
				{
					field : 'vrsnDt',
					title : '版本日期'
				},
				{
					field : 'ancMod',
					title : '发布方式',
		            formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(ancModDatas, value);
		            }
				},
				{
					field : 'ancModeInd',
					title : '发布模式',
		            formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(ancModeIndDatas, value);
		            }
				},
				{
					field : 'ancTmpnt',
					title : '发布时点'
				},
				{
					field : 'strPubSttm',
					title : '开始时间'
				},
				{
					field : 'strPubEdtm',
					title : '结束时间'
				},
				{
					field : 'udtscriptRte',
					title : '更新脚本路径'
				},
				{
					field : 'cmpscriptRte',
					title : '比对脚本路径'
				},
				{
					field : 'lclVwRte',
					title : '本地视图路径'
				},
				{
					field : 'rmtVwRte',
					title : '远程视图路径'
				},
				/* {
					field : 'lastUdtDtTm',
					title : '最后更新日期时间'
				}, */
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
		            	actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.lgcPk + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.lgcPk + '\')"><i class="fa fa-remove"></i>删除</a>');
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>